<?php

namespace App\Model;


use App\Common\SysContext;
use App\ModelBase\__t_wx_user_a_xf;

class t_wx_user_a_xf extends __t_wx_user_a_xf
{
    static function funcGetUserByPhone($phone)
    {
        $data = SysContext::funcInsStatic()->db()
            ->where('wxuserxf_x_id', SysContext::funcInsStatic()->funcGetX())
            ->where('wxuserxf_phone', $phone)
            ->getOne(t_wx_user_a_xf::table());

        $entity = null;
        if ($data !== null)
        {
            $entity = t_wx_user_a_xf::funcArrayToEntity($data);
        }


        return $entity;
    }
}